package com.xb.stream.common;


import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class PropertiesLoad {

    private final static String CONFIG_FILE = "common.properties";

    public static String getValue(String key){
        InputStream in = PropertiesLoad.class.getClassLoader().getResourceAsStream(CONFIG_FILE);

        Properties pro = new Properties();
        String value ="";
        try {
            pro.load(in);
            value = pro.getProperty(key);
        } catch (IOException e) {
            e.printStackTrace();
        }

        return value;
    }

}
